#include "stdafx.h"
#include "HasPtr.h"


HasPtr::HasPtr()
{
}


HasPtr::~HasPtr()
{
	delete ps;
}

//HasPtr& HasPtr::operator=(const HasPtr &hp)
//{
//	//ps = new string(*hp.ps);
//	//i = hp.i;
//	//if (this != &hp) {
//	//	delete ps;
//	//	ps = new string(*hp.ps);
//	//	i = hp.i;
//	//}
//	cout << "----HasPtr's copy-assignment----" << endl;
//	auto newp = new string(*hp.ps);
//	delete ps;
//	ps = newp;
//	i = hp.i;
//	return *this;
//}

void f(const Numbered &s)
{
	cout << "f:" << s.mysn << endl;
}

